package com.zbkj.crmeb.task.plat.bieyang.enums;

import java.util.Objects;

/**
 * @author: wsl
 * @date: 2024/2/24 0024 18:19
 * @ClassName: ExpressEnum
 */
public enum ExpressEnum {
    DEPPON_EXPRESS("",0,"DEPPON_EXPRESS"),
    EMS("EMS",31,"邮政"),
    JD_LOGISTICS("JD_LOGISTICS",134,"京东物流"),
    SFEXPRESS("SFEXPRESS",188,"顺丰速递"),
    STO("STO",266,"申通"),
    YTO("YTO",243,"圆通"),
    ZTO("ZTO",429,"中通")
            ;

    private String key;

    private Integer code;

    private String des;

    ExpressEnum(String key, Integer code, String des) {
        this.key = key;
        this.code = code;
        this.des = des;
    }

    public String getKey() {
        return key;
    }

    public Integer getCode() {
        return code;
    }

    public String getDes() {
        return des;
    }

    public static String getKeyByCode(Integer code){
        for (ExpressEnum value : ExpressEnum.values()) {
            if (Objects.equals(value.code,code)){
                return value.key;
            }
        }
        return null;
    }
}
